home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-26 | 68.4 KB | 2,766 lines |
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/Changelo,v
- retrieving revision 1.98
- diff -c -r1.98 Changelo
- *** 1.98 1993/07/13 17:07:21
- --- Changelo 1993/10/26 23:51:25
- ***************
- *** 3980,3982 ****
- --- 3980,4284 ----
- take out setlinebuf proto, it does'nt really belong here.
-
- ---------------------------- Patchlevel 93 ---------------------------
- +
- + falcon.h:: howard
- + corrections from howard
- +
- + math-68881.h:: ++jrb
- + -- Put extern "C" around file when __cplusplus
- + -- Make hypot use internal version of sqrt (because signature
- + clash in libg++:xfix )
- + -- Define internal version (_sqrt) of sqrt.
- +
- + osbind.h: Robert.Wilhelm@Physik.TU-Muenchen.DE
- + chand addw #n,sp to lea n(s),sp which is 4 cycles shorter
- +
- + dirent.c:: Christoph Koerner (christof@wowbagger.pc-labor.uni-bremen.de)
- + sync up dirent.c with changes in dirent.h (DIRENTSIZ -> __DIRENTSIZ)
- +
- + fprintf.c:: ++jrb
- + break out vfprintf, printf and vprintf into their own .o's. that
- + way the user can replace any of them.
- +
- + printf.c, vfprintf.c, vprintf.c:: ++jrb
- + NEW files
- +
- + mincl:: ++jrb
- + add targets for above
- +
- + gnulib2.c:: Steven Ourada (sourada@iastate.edu)
- + #define WORD_BIG_ENDIAN for long long.
- +
- + sync with mntlib35:
- +
- + doprnt.c: ++Bjarne_Pohlers@ms2.maus.de
- + Add support for printing/scanning long longs.
- +
- + div.c: ++pvt1-117
- + Add div functions for compilers other than GCC.
- +
- + bsearch.c: ++dsb
- + Fix bug reported by Thorsten Roskowetz: the order arguments to
- + bsearch()'s comparison function was reversed.
- +
- + ioctl.h: ++Jan-Hinrich_Fessel@un.maus.ruhr.de (Jan-Hinrich Fessel)
- + Make it possible to include both ioctl.h and filesys.h.
- +
- + pgrp.c: ++schwab
- + Correctly check the MiNT version in _bsd_getpgrp().
- +
- + doprnt.c: ++pvt1-117
- + Changes to keep Lattice C from generating annoying warnings.
- +
- + math.h, process.h, support.h, unistd.h, findfile.c, textio.c: ++schwab
- + Add 'const' to declarations where appropriate.
- +
- + malloc.c: ++schwab
- + Make malloc() round all memory requests to the page size to be able
- + to use all the available memory.
- +
- + setjmp.cpp, setjmp.h: ++schwab
- + Some cleanup; one element of jmp_buf[] can be saved by using the
- + fact that signal 0 cannot be masked; why was the type char*[] insead
- + of long[]?
- +
- + fopen.c: ++schwab
- + Make fopen() use 0666 as the default file mask (use umask() if you
- + want something else); make mkdir() respect the umask setting.
- +
- + utime.c: ++shenson@nyx.cs.du.edu
- + Pass through a NULL tset argument unchanged to the filesystem
- + so that it can determine permissions correctly.
- +
- + falcon.h: ++hyc@hanauma.Jpl.Nasa.Gov, ++Markus_Kilbinger@ac.maus.de
- + Change several erroneous macros to correctly cast return to short.
- +
- + errno.h: ++Ole_Arndt
- + Add errors ENOTDIR and ELOOP.
- +
- + signal.h: ++Ole_Arndt@f.maus.de (Ole Arndt)
- + Fix definition of _SIGSET_MAX_INDEX to correct several bugs
- + in the POSIX signal mask functions.
- +
- + stdio.h:
- + Add vsscanf() and _getbuf() protos (yech).
- +
- + dirent.h:
- + Add alphasort() proto (excluded by _POSIX_SOURCE).
- +
- + utmp.h:
- + Rename write_utmp() to _write_utmp(). Rename write_wtmp() to
- + _write_wtmp(). Add protos (and other cleanups) to utmp.h.
- +
- + atof.c, fdopen.c, fputs.c:
- + Move 'register' to beginning of declarations (shuts up gcc -Wall).
- +
- + fwrite.c: ++michal
- + With unbuffered IO fwrite miscounts number of characters written.
- +
- + findfile.c: ++michal
- + Try to accomodate tos style paths PATH=e:\bin,c:\bin,...
- +
- + unistd.h: ++jrb
- + Take out setlinebuf, doesn't really belong here.
- +
- + ffs.c: ++NTOMCZAK@vm.ucs.UAlberta.CA (Michal Jaegermann)
- + An even faster algorithm. Yow! Are we optimized yet?
- +
- + support.h:
- + Added _exit() and gethostname() protos. Removed write_utmp() and
- + write_wtmp() protos.
- +
- + lib.h, crtinit.c:
- + Moved prototypes from crtinit.c to lib.h, and added more to lib.h.
- +
- + abort.c, lib.h:
- + Make abort() close file handles in exactly the same manner
- + as exit().
- +
- + signal.h: ++nox@jelal.north.de, ++Oskar, ++entropy
- + Fix type of sa_mask in struct sigaction (sigset_t, not long).
- +
- + falcon.h: ++Markus_Kilbinger@ac.maus.de, ++entropy
- + Add missing traps.
- +
- + unistd.h, support.h:
- + Cleaned unistd.h for easier reading. Moved back the link(),
- + symlink(), and readlink() protos from support.h (sorry if I seem
- + really indecisive on where some of these protos belong).
- +
- + doprnt.c, open.c, putenv.c, utime.c:
- + Include appropriate headers for protos (and fixed mknod() proto).
- +
- + sys/statfs.h:
- + Add statfs() proto.
- +
- + sys/errno.h, sys/ioctl.h, sys/resource.h, sys/signal.h, sys/wait.h:
- + Fix multiple-include protection to hopefully prevent possible
- + infinite include loops (see Bugs file).
- +
- + getpw.c, pwd.h: ++Jan-Hinrich_Fessel@un.maus.de (Oskar)
- + Use uid_t (_UID_T) for getpwuid() instead of int (POSIX).
- +
- + === end of merge
- +
- + symlink.c, spawnve.c, spawnvp.c, exec.c: ++jrb
- + adjust args to meet new protos in process.h, unistd.h
- +
- + getpage.c:: ++jrb
- + NEW file. defines getpagesize() (for use with malloc.c etc)
- +
- + mincl:: ++jrb
- + add proto for above
- +
- + == merge with mintlib 36
- + _addsubs.cpp: ++nox
- + Correct an inverted branch.
- + utime.c: ++schwab
- + utime(NULL) uses time() to convert the current time to Unix format
- + and immediately converts it back to GEMDOS format. Instead it should
- + use the GEMDOS format directly.
- + stime() must be changed because Tset{date,time} can now return a
- + real error number. This depends on Tset{date,time} returning -1 if
- + args are bad, which is true for all TOS versions, i think.
- + falcon.h: ++Markus_Kilbinger@ac.maus.de
- + Add two omitted backslashes to fix new trap definitions.
- + chmod.c: ++schwab@ls5.informatik.uni-dortmund.de
- + chmod() unnecessarily calls stat() to check if the file is a
- + directory; this information is already available through Fattrib().
- + nlist.c, nlist.h: ++shenson@nyx.cs.du.edu
- + NEW files nlist.c, nlist.h. A version of nlist() for mntlib/toslib.
- + Works OK with my binary config program but your milage may vary.
- + wcmb.c, stdlib.h: ++pvt1-117@nada.kth.se
- + NEW file wcmb.c for ANSI wide char functions.
- + ctype.h: ++dsb@cs.duke.edu
- + The toint() macro in ctype.h was translating hex digits wrong.
- +
- + == end merge
- +
- + mincl:: ++jrb
- + add tagets for nlist and wcmb
- +
- + == merge with mntlib 37
- +
- + bzero.cpp, mincl: ++entropy
- + Break bzero and memset into separate .o's (reduce drag).
- +
- + string.h, strcmp.c: ++pvt1-117
- + Allow use of builtin string functions.
- +
- + file.h: ++entropy
- + Add FREAD and FWRITE macros for TIOCFLUSH flushing modes (not yet
- + implemented in MiNT).
- +
- + unistd.h: ++entropy
- + Add tcgetpgrp() and tcsetpgrp() protos.
- +
- + ioctl.h: ++entropy
- + Changes to account for definitions in common with termios.h,
- + also add _RTSCTS flag definition.
- +
- + termios.h: ++entropy
- + NEW files, partially implementing the POSIX termios functions (in
- + the MiNT library).
- +
- + wait.h: ++entropy
- + Add WSTOPSIG() macro (POSIX).
- +
- + utime.c: ++entropy
- + Add a kludge so that we pretend the utime() worked for directories.
- +
- + stat.h: ++entropy
- + Mode argument is now mode_t instead of unsigned (POSIX).
- +
- + mkfifo.c, stat.h: ++entropy
- + NEW file providing a fake mkfifo(), and a prototype for it.
- +
- + resource.h: ++entropy
- + Add BSD-compatible struct rusage members with 0 values for
- + minimal compatibility.
- +
- + errno.h: ++entropy
- + Added EOPNOTSUPP as (temporary) alias for EINVAL.
- + Added ECHILD as alias for ENOENT (POSIX).
- +
- + doprnt.c, fprintf.c, printf.c, sprintf.c,
- + vfprintf.c, vfprintf.c, lib.h: ++schwab
- + Change the interface of _doprnt to also pass a putchar function
- + similar to _scanf. This allows use of sprintf in a program which
- + doesn't use stdio and it simplifies the implementation of sprintf a
- + bit.
- +
- + lseek.c: ++schwab@ls5.informatik.uni-dortmund.de
- + Make lseek() and tell() always return -1 on errors. Make lseek()
- + work better with unseekable devices. Don't modify errno
- + when no error has occurred. General cleanup.
- +
- + nlist.c: ++pvt1-117
- + Add some typecasts to keep Lattice happy.
- +
- + mintbind.h: ++pvt1-117@nada.kth.se
- + Add some casts in the Lattice C inlines.
- +
- + frexp.cpp: ++Cristof_Stadler@s2.maus.de
- + Bug fix: add a missing @.
- +
- + ctime.c, doprnt.c, findfile.c, getpass.c,
- +
- + localtim.c, strftime.c, strncat.c: ++pvt1-117@nada.kth.se
- + Removed some dead assignments and increments.
- +
- + stdlib.h: ++entropy
- + Added NULL (POSIX).
- +
- + == end merge
- +
- + mincl:: ++jrb
- + add new rules for bzero/memset
- + new target for (dummy) mkfifo
- +
- + == merge with mntlib 38
- +
- + compiler.h: ++pvt1-117
- + Make LCC do the right thing in limits.h.
- +
- + termios.h: ++entropy
- + Add VLNEXT and VWERASE control chars.
- +
- + types.h: ++roemer@hera.rbi.informatik.uni-frankfurt.de.uni-frankfurt.de
- + Add fd_set type and related macros.
- +
- + falcon.h: ++Markus_Kilbinger@ac.maus.de
- + Change return types of VsetMask() and Dsp_Reserve() from
- + void to short.
- +
- + _mulsi3.s, _umulsi3.s: ++schwab
- + .lmul and .ulmul aren't equivalent.
- +
- + wait.h: ++schwab@ls5.informatik.uni-dortmund.de
- + Make the wait prototype indirection more robust. Also fix the
- + definition of WIFSIGNALED().
- +
- + falcon.h: ++pvt1-117
- + Inline traps for Lattice.
- +
- + wcmb.c: ++pvt1-117
- + Use _wnull from wnull.c instead of a local variable.
- +
- + wcscat.c, wcscmp.c, wcscpy.c, wcslen.c, wnull.c: ++pvt1-117
- + NEW files for ISO wide char support.
- +
- + stdlib.h: ++pvt1-117@nada.kth.se
- + Add prototypes for new ISO widechar functions.
- + == end merge
- +
- + mincl:: ++jrb
- + add targets for wcscat.o, wcscmp.o, wcscpy.o, wcslen.o, wnull.o
- +
- + abort.c:: ++jrb
- + rid of redundant fclose_all_files(), exit() should do all that.
- +
- + limits.h:: ++jrb at suggestion of michal
- + make groups limit 0 for non-MiNT
- +
- + ---------------------------- Patchlevel 94 ---------------------------
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/Makefile,v
- retrieving revision 1.19
- diff -c -r1.19 Makefile
- *** 1.19 1993/07/13 17:07:24
- --- Makefile 1993/10/26 23:48:24
- ***************
- *** 41,49 ****
-
- endif
-
- # Additional options for compiling C code
-
- ! XFLAGS := -I../co
-
- # Dynamic selection of options for each target library...
-
- --- 41,52 ----
-
- endif
-
- + # Flags for extra 'long long' support under newer gcc's
- + #LONGLONG=-DPRINTF_LONGLONG
- +
- # Additional options for compiling C code
-
- ! XFLAGS := -I../co -Wall -Wmissing-prototypes -Wstrict-prototypes
-
- # Dynamic selection of options for each target library...
-
- ***************
- *** 87,93 ****
- CFFLAGS = $(SHORT) $(COPTS)
-
- # normal CFLAGS including int size and omit-frame-pointer
- ! CFLAGS= $(CFFLAGS) $(FRAME)
-
- # cflags for stuff that needs to be compiled with 32 bit ints
- CLFLAGS= $(COPTS) $(FRAME) $(DSHORT)
- --- 90,96 ----
- CFFLAGS = $(SHORT) $(COPTS)
-
- # normal CFLAGS including int size and omit-frame-pointer
- ! CFLAGS= $(CFFLAGS) $(FRAME) $(LONGLONG)
-
- # cflags for stuff that needs to be compiled with 32 bit ints
- CLFLAGS= $(COPTS) $(FRAME) $(DSHORT)
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/PatchLev.h,v
- retrieving revision 1.69
- diff -c -r1.69 PatchLev.h
- *** 1.69 1993/07/13 17:07:26
- --- PatchLev.h 1993/10/26 23:48:28
- ***************
- *** 1,5 ****
-
- ! #define PatchLevel "93"
-
- /*
- *
- --- 1,5 ----
-
- ! #define PatchLevel "94"
-
- /*
- *
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/dirent.c,v
- retrieving revision 1.14
- diff -c -r1.14 dirent.c
- *** 1.14 1992/06/24 17:27:09
- --- dirent.c 1993/09/15 15:31:20
- ***************
- *** 95,101 ****
- lent = ldir->s_dir;
-
- while (lent) {
- ! x = malloc((size_t)(DIRENTSIZ(strlen(lent->linkname))));
- if (!x) {
- errno = ENOMEM;
- free(dd->D_path);
- --- 95,101 ----
- lent = ldir->s_dir;
-
- while (lent) {
- ! x = malloc((size_t)(__DIRENTSIZ(strlen(lent->linkname))));
- if (!x) {
- errno = ENOMEM;
- free(dd->D_path);
- ***************
- *** 155,161 ****
- /* put the real file's info in the structure */
- goto tos_fill;
- }
- ! x = malloc((size_t)(DIRENTSIZ(strlen(tmpnam))));
- if (!x) {
- errno = ENOMEM;
- while (d) {
- --- 155,161 ----
- /* put the real file's info in the structure */
- goto tos_fill;
- }
- ! x = malloc((size_t)(__DIRENTSIZ(strlen(tmpnam))));
- if (!x) {
- errno = ENOMEM;
- while (d) {
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/exec.c,v
- retrieving revision 1.3
- diff -c -r1.3 exec.c
- *** 1.3 1991/05/23 14:43:17
- --- exec.c 1993/10/26 23:48:31
- ***************
- *** 8,13 ****
- --- 8,14 ----
- * the real work is done in spawnve.c.
- */
-
- + #include <compiler.h>
- #include <osbind.h>
- #include <basepage.h>
- #include <process.h>
- ***************
- *** 19,25 ****
-
- int
- execve(path, argv, envp)
- ! char *path, **argv, **envp;
- {
- int savex = _x_Bit_set_in_stat;
-
- --- 20,28 ----
-
- int
- execve(path, argv, envp)
- ! const char *path;
- ! char * const *argv;
- ! char * const *envp;
- {
- int savex = _x_Bit_set_in_stat;
-
- ***************
- *** 41,55 ****
-
- int
- execv(path, argv)
- ! char *path, **argv;
- {
- return execve(path, argv, (char **)0);
- }
-
- int
- execvp(name, argv)
- ! char *name;
- ! char **argv;
- {
- /* note: we cannot check x bit here as we dont know the full path.
- * we flag spawnvp to do this by passing it -ve mode
- --- 44,59 ----
-
- int
- execv(path, argv)
- ! const char *path;
- ! char * const *argv;
- {
- return execve(path, argv, (char **)0);
- }
-
- int
- execvp(name, argv)
- ! const char *name;
- ! char * const *argv;
- {
- /* note: we cannot check x bit here as we dont know the full path.
- * we flag spawnvp to do this by passing it -ve mode
- ***************
- *** 58,64 ****
- }
-
- #ifdef __STDC__
- ! int execl(char *path, ...)
- #else
- int execl(path)
- char *path;
- --- 62,68 ----
- }
-
- #ifdef __STDC__
- ! int execl(const char *path, ...)
- #else
- int execl(path)
- char *path;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/mincl,v
- retrieving revision 1.30
- diff -c -r1.30 mincl
- *** 1.30 1993/07/10 16:41:35
- --- mincl 1993/10/26 23:48:33
- ***************
- *** 25,31 ****
- calloc.o clock.o ctime.o ctype.o difftime.o \
- fopen.o fclose.o fdopen.o fflush.o fgetc.o fgets.o \
- fputc.o fputs.o fread.o fwrite.o fseek.o fsetpos.o \
- ! fprintf.o eprintf.o sprintf.o \
- fscanf.o scanf.o sscanf.o \
- getenv.o putenv.o gets.o getw.o localtim.o \
- malloc.o qsort.o raise.o rand.o realloc.o \
- --- 25,31 ----
- calloc.o clock.o ctime.o ctype.o difftime.o \
- fopen.o fclose.o fdopen.o fflush.o fgetc.o fgets.o \
- fputc.o fputs.o fread.o fwrite.o fseek.o fsetpos.o \
- ! fprintf.o vfprintf.o printf.o vprintf.o eprintf.o sprintf.o \
- fscanf.o scanf.o sscanf.o \
- getenv.o putenv.o gets.o getw.o localtim.o \
- malloc.o qsort.o raise.o rand.o realloc.o \
- ***************
- *** 33,46 ****
- setlocal.o strftime.o strtol.o system.o \
- tmpnam.o tmpfile.o \
- ltoa.o main.o doprnt.o div.o \
- ! strtoul.o fungetc.o filbuf.o getbuf.o toxxx.o
-
- #
- # other portable stuff
- PORT = a64l.o alphasor.o abs.o catch.o dirent.o findfile.o ftw.o getpw.o \
- getlogin.o getopt.o getpass.o ident.o mktemp.o putpwent.o scandir.o strlwr.o \
- strrev.o strupr.o regexp.o regsup.o textio.o random.o obstack.o \
- ! il.o ic.o iw.o ig.o ip.o frwbin.o ctermid.o cuserid.o ffs.o
- #
- # the string library
-
- --- 33,47 ----
- setlocal.o strftime.o strtol.o system.o \
- tmpnam.o tmpfile.o \
- ltoa.o main.o doprnt.o div.o \
- ! strtoul.o fungetc.o filbuf.o getbuf.o toxxx.o \
- ! wcmb.o wcscat.o wcscmp.o wcscpy.o wcslen.o wnull.o
-
- #
- # other portable stuff
- PORT = a64l.o alphasor.o abs.o catch.o dirent.o findfile.o ftw.o getpw.o \
- getlogin.o getopt.o getpass.o ident.o mktemp.o putpwent.o scandir.o strlwr.o \
- strrev.o strupr.o regexp.o regsup.o textio.o random.o obstack.o \
- ! il.o ic.o iw.o ig.o ip.o frwbin.o ctermid.o cuserid.o ffs.o nlist.o
- #
- # the string library
-
- ***************
- *** 53,60 ****
- # stuff to fake unix system calls
-
- UNIX= access.o chdir.o chmod.o close.o console.o device.o dup.o exec.o fcntl.o \
- ! fhandle.o fork.o getcwd.o getpid.o getuid.o grp.o ioctl.o isatty.o \
- ! link.o lseek.o mkdir.o null.o open.o perror.o pgrp.o pipe.o popen.o psignal.o \
- read.o rename.o rmdir.o \
- sbrk.o sgtty.o signal.o siglist.o sleep.o spawnve.o spawnvp.o stat.o \
- symdir.o symlink.o tchars.o time.o timeoday.o times.o \
- --- 54,61 ----
- # stuff to fake unix system calls
-
- UNIX= access.o chdir.o chmod.o close.o console.o device.o dup.o exec.o fcntl.o \
- ! fhandle.o fork.o getcwd.o getpage.o getpid.o getuid.o grp.o ioctl.o isatty.o \
- ! link.o lseek.o mkdir.o mkfifo.o null.o open.o perror.o pgrp.o pipe.o popen.o psignal.o \
- read.o rename.o rmdir.o \
- sbrk.o sgtty.o signal.o siglist.o sleep.o spawnve.o spawnvp.o stat.o \
- symdir.o symlink.o tchars.o time.o timeoday.o times.o \
- ***************
- *** 95,100 ****
- --- 96,107 ----
- $(FCOMPS): %.o: _cmpsf2.cpp
- $(CC) $(PPFLAGS) -DL$* -c $< -o $@
-
- + bzero.o: %.o: bzero.cpp
- + $(CC) $(PPFLAGS) -DL$* -c $< -o $@
- +
- + memset.o: %.o: bzero.cpp
- + $(CC) $(PPFLAGS) -DL$* -c $< -o $@
- +
- %.o : %.cpp
- $(CC) $(PPFLAGS) -c $<
-
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/spawnve.c,v
- retrieving revision 1.17
- diff -c -r1.17 spawnve.c
- *** 1.17 1992/10/09 20:32:44
- --- spawnve.c 1993/10/26 23:48:35
- ***************
- *** 40,49 ****
-
- int
- spawnve(mode, _path, argv, envp)
- ! int mode;
- ! char *_path;
- ! char **argv;
- ! char **envp;
- {
- void __exit(long);
- static char path[MAXPATHLEN];
- --- 40,49 ----
-
- int
- spawnve(mode, _path, argv, envp)
- ! int mode;
- ! const char *_path;
- ! char * const *argv;
- ! char * const *envp;
- {
- void __exit(long);
- static char path[MAXPATHLEN];
- ***************
- *** 169,187 ****
-
- int
- spawnv(mode, path, argv)
- ! int mode;
- ! char *path;
- ! char **argv;
- {
- return spawnve(mode, path, argv, environ);
- }
-
- #ifdef __STDC__
- ! int spawnle(int mode, char *path, ...)
- #else
- int spawnle(mode, path)
- ! int mode;
- ! char *path;
- #endif
- {
- va_list args;
- --- 169,187 ----
-
- int
- spawnv(mode, path, argv)
- ! int mode;
- ! const char *path;
- ! char * const *argv;
- {
- return spawnve(mode, path, argv, environ);
- }
-
- #ifdef __STDC__
- ! int spawnle(int mode, const char *path, ...)
- #else
- int spawnle(mode, path)
- ! int mode;
- ! const char *path;
- #endif
- {
- va_list args;
- ***************
- *** 195,205 ****
- }
-
- #ifdef __STDC__
- ! int spawnl(int mode, char *path, ...)
- #else
- int spawnl(mode, path)
- ! int mode;
- ! char *path;
- #endif
- {
- va_list args;
- --- 195,205 ----
- }
-
- #ifdef __STDC__
- ! int spawnl(int mode, const char *path, ...)
- #else
- int spawnl(mode, path)
- ! int mode;
- ! const char *path;
- #endif
- {
- va_list args;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/spawnvp.c,v
- retrieving revision 1.7
- diff -c -r1.7 spawnvp.c
- *** 1.7 1993/03/01 17:29:46
- --- spawnvp.c 1993/10/26 23:48:37
- ***************
- *** 22,29 ****
- int
- spawnvp(mode, name, argv)
- int mode;
- ! char *name;
- ! char **argv;
- {
- char *execname;
-
- --- 22,29 ----
- int
- spawnvp(mode, name, argv)
- int mode;
- ! const char *name;
- ! char * const *argv;
- {
- char *execname;
-
- ***************
- *** 55,65 ****
- }
-
- #ifdef __STDC__
- ! int spawnlp(int mode, char *name, ...)
- #else
- int spawnlp(mode, name)
- ! int mode;
- ! char *name;
- #endif
- {
- va_list args;
- --- 55,65 ----
- }
-
- #ifdef __STDC__
- ! int spawnlp(int mode, const char *name, ...)
- #else
- int spawnlp(mode, name)
- ! int mode;
- ! const char *name;
- #endif
- {
- va_list args;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/symlink.c,v
- retrieving revision 1.9
- diff -c -r1.9 symlink.c
- *** 1.9 1992/06/24 17:27:09
- --- symlink.c 1993/10/26 23:48:39
- ***************
- *** 14,20 ****
-
- int
- symlink(old, new)
- ! char *old, *new;
- {
- char linkpath[FILENAME_MAX];
- char *name;
- --- 14,20 ----
-
- int
- symlink(old, new)
- ! const char *old, *new;
- {
- char linkpath[FILENAME_MAX];
- char *name;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/_addsubs.cpp,v
- retrieving revision 1.8
- diff -c -r1.8 _addsubs.cpp
- *** 1.8 1993/06/04 15:22:08
- --- _addsubs.cpp 1993/10/26 23:52:08
- ***************
- *** 83,89 ****
- bclr d3,d1 | kill sign bit u.exp
- bclr d3,d0 | kill sign bit u.exp
- btst d3,d2 | same sign for u and v?
- ! bne 0f
- cmpl d0,d1 | different signs - maybe x - x ?
- seq d2 | set 'cancellation' flag
- 0:
- --- 83,89 ----
- bclr d3,d1 | kill sign bit u.exp
- bclr d3,d0 | kill sign bit u.exp
- btst d3,d2 | same sign for u and v?
- ! beq 0f
- cmpl d0,d1 | different signs - maybe x - x ?
- seq d2 | set 'cancellation' flag
- 0:
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/_mulsi3.s,v
- retrieving revision 1.2
- diff -c -r1.2 _mulsi3.s
- *** 1.2 1992/11/24 04:14:47
- --- _mulsi3.s 1993/10/26 23:52:10
- ***************
- *** 11,20 ****
-
- .text
- .even
- ! .globl __mulsi3, ___mulsi3, .lmul, .ulmul
-
- .lmul:
- - .ulmul:
- __mulsi3:
- ___mulsi3:
- movel d2,a0 | save registers
- --- 11,19 ----
-
- .text
- .even
- ! .globl __mulsi3, ___mulsi3, .lmul
-
- .lmul:
- __mulsi3:
- ___mulsi3:
- movel d2,a0 | save registers
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/_umulsi3.s,v
- retrieving revision 1.1
- diff -c -r1.1 _umulsi3.s
- *** 1.1 1990/03/26 17:37:22
- --- _umulsi3.s 1993/10/26 23:52:12
- ***************
- *** 11,18 ****
-
- .text
- .even
- ! .globl __umulsi3, ___umulsi3
-
- __umulsi3:
- ___umulsi3:
- movel d2,a0 | save registers
- --- 11,19 ----
-
- .text
- .even
- ! .globl __umulsi3, ___umulsi3, .ulmul
-
- + .ulmul:
- __umulsi3:
- ___umulsi3:
- movel d2,a0 | save registers
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/abort.c,v
- retrieving revision 1.5
- diff -c -r1.5 abort.c
- *** 1.5 1992/06/01 01:54:10
- --- abort.c 1993/10/26 23:52:14
- ***************
- *** 3,8 ****
- --- 3,9 ----
- #include <signal.h>
- #include <stdlib.h>
- #include <unistd.h>
- + #include "lib.h"
-
- #ifndef SIGABRT
- #define SIGABRT SIGIOT
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/atof.c,v
- retrieving revision 1.25
- diff -c -r1.25 atof.c
- *** 1.25 1993/03/01 17:34:19
- --- atof.c 1993/10/26 23:52:16
- ***************
- *** 241,247 ****
- #define CONVF 0x08
-
- double strtod (s, endptr)
- ! const register char *s;
- char **endptr;
- {
- double accum = 0.0;
- --- 241,247 ----
- #define CONVF 0x08
-
- double strtod (s, endptr)
- ! register const char *s;
- char **endptr;
- {
- double accum = 0.0;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/bsearch.c,v
- retrieving revision 1.9
- diff -c -r1.9 bsearch.c
- *** 1.9 1992/09/14 14:56:40
- --- bsearch.c 1993/10/26 23:52:17
- ***************
- *** 30,44 ****
- while(a <= b)
- {
- c = (a + b) >> 1; /* == ((a + b) / 2) */
- ! if ((dir = (*cmp)((void *)((char *)base + (c * size)), key)) != 0)
- {
- ! if (dir > 0)
- {
- if (c == 0)
- return(NULL);
- b = c - 1;
- }
- ! else /* (dir < 0) */
- a = c + 1;
- }
- else
- --- 30,44 ----
- while(a <= b)
- {
- c = (a + b) >> 1; /* == ((a + b) / 2) */
- ! if ((dir = (*cmp)(key, (void *)((char *)base + (c * size)))) != 0)
- {
- ! if (dir < 0)
- {
- if (c == 0)
- return(NULL);
- b = c - 1;
- }
- ! else /* (dir > 0) */
- a = c + 1;
- }
- else
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/bzero.cpp,v
- retrieving revision 1.4
- diff -c -r1.4 bzero.cpp
- *** 1.4 1993/02/18 00:00:10
- --- bzero.cpp 1993/10/26 23:52:19
- ***************
- *** 6,13 ****
-
- .text
- .even
- ! .globl _bzero
- ! .globl __bzero
- .globl _memset
-
- | void *memset( void *dest, int val, size_t len );
- --- 6,13 ----
-
- .text
- .even
- !
- ! #ifdef Lmemset
- .globl _memset
-
- | void *memset( void *dest, int val, size_t len );
- ***************
- *** 30,35 ****
- --- 30,40 ----
- #endif
- jeq exit | length==0? (size_t)
- jra do_set
- + #endif /* Lmemset */
- +
- + #ifdef Lbzero
- + .globl _bzero
- + .globl __bzero
-
- | void bzero( void *dest, size_t length );
- | void _bzero( void *dest, unsigned long length );
- ***************
- *** 50,55 ****
- --- 55,61 ----
- scommon:
- jeq exit | length==0? (size_t)
- clrb d0 | value
- + #endif /* Lbzero */
-
- do_set: | a0 dest, d0.b byte, d1.l length
- movel d2,sp@-
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/chmod.c,v
- retrieving revision 1.9
- diff -c -r1.9 chmod.c
- *** 1.9 1993/07/10 16:36:37
- --- chmod.c 1993/10/26 23:52:20
- ***************
- *** 19,25 ****
- {
- int dosattrib = 0, r;
- char path[PATH_MAX];
- - struct stat stb;
-
- (void)_unx2dos(_path, path);
-
- --- 19,24 ----
- ***************
- *** 33,42 ****
- }
-
- /* The following lines ensure that the archive bit isn't cleared */
- ! r = Fattrib(path, 0, dosattrib);
- ! if (r > 0 && (r & FA_CHANGED))
- dosattrib |= FA_CHANGED;
-
- #if 0
- if (!(mode & S_IREAD))
- dosattrib |= FA_HIDDEN;
- --- 32,48 ----
- }
-
- /* The following lines ensure that the archive bit isn't cleared */
- ! r = Fattrib(path, 0, 0);
- ! if (r < 0)
- ! {
- ! errno = -r;
- ! return -1;
- ! }
- ! if (r & FA_CHANGED)
- dosattrib |= FA_CHANGED;
-
- + if (r & FA_DIR)
- + dosattrib |= FA_DIR;
- #if 0
- if (!(mode & S_IREAD))
- dosattrib |= FA_HIDDEN;
- ***************
- *** 46,55 ****
- r = Fattrib(path, 1, dosattrib);
- if (r < 0) {
- /* GEMDOS doesn't allow chmod on a directory, so pretend it worked */
- ! if (!stat(_path, &stb)) {
- ! if ( (stb.st_mode & S_IFMT) == S_IFDIR )
- ! return 0;
- ! }
- errno = -r;
- return -1;
- }
- --- 52,59 ----
- r = Fattrib(path, 1, dosattrib);
- if (r < 0) {
- /* GEMDOS doesn't allow chmod on a directory, so pretend it worked */
- ! if (dosattrib & FA_DIR)
- ! return 0;
- errno = -r;
- return -1;
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/ctime.c,v
- retrieving revision 1.10
- diff -c -r1.10 ctime.c
- *** 1.10 1993/03/01 17:34:21
- --- ctime.c 1993/10/26 23:52:22
- ***************
- *** 91,97 ****
- #ifdef __GNUC__
- _TWODIG(ptr, *valp);
- #else
- ! ptr = two_dig(ptr, *valp);
- #endif /* __GNUC__ */
- if ('0' == timebuf[8])
- timebuf[8] = ' '; /* blank out leading zero on a day */
- --- 91,97 ----
- #ifdef __GNUC__
- _TWODIG(ptr, *valp);
- #else
- ! two_dig(ptr, *valp);
- #endif /* __GNUC__ */
- if ('0' == timebuf[8])
- timebuf[8] = ' '; /* blank out leading zero on a day */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/div.c,v
- retrieving revision 1.4
- diff -c -r1.4 div.c
- *** 1.4 1992/04/06 19:33:32
- --- div.c 1993/10/26 23:52:23
- ***************
- *** 6,11 ****
- --- 6,13 ----
- */
- #include <stdlib.h>
-
- + #ifdef __GNUC__
- +
- long __divsi3(long, long); /* returns: quot in d0.l remainder in d1.l */
-
- #ifdef __MSHORT__
- ***************
- *** 44,46 ****
- --- 46,76 ----
- ); /* compiler dependency, dont tell gcc about d0,d1 clobb */
- return result;
- }
- +
- + #else /* !__GNUC__ */
- +
- + div_t
- + div(num, denom)
- + int num, denom;
- + {
- + div_t res;
- +
- + res.quot = num / denom;
- + res.rem = num % denom;
- +
- + return res;
- + }
- +
- + ldiv_t
- + ldiv(num, denom)
- + long num, denom;
- + {
- + ldiv_t res;
- +
- + res.quot = num / denom;
- + res.rem = num % denom;
- +
- + return res;
- + }
- +
- + #endif /* !__GNUC__ */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/doprnt.c,v
- retrieving revision 1.24
- diff -c -r1.24 doprnt.c
- *** 1.24 1993/07/10 16:36:38
- --- doprnt.c 1993/10/26 23:52:25
- ***************
- *** 59,65 ****
- #include <ctype.h>
- #include <string.h>
- #include <limits.h>
- ! #include <math.h> /* mjr++ */
-
- #ifndef __GNUC__ /* gcc lib has these typedefs in sys/types.h */
- #ifndef __MINT__ /* as does the MiNT library */
- --- 59,66 ----
- #include <ctype.h>
- #include <string.h>
- #include <limits.h>
- ! #include <math.h> /* mjr++ */
- ! #include "lib.h"
-
- #ifndef __GNUC__ /* gcc lib has these typedefs in sys/types.h */
- #ifndef __MINT__ /* as does the MiNT library */
- ***************
- *** 77,91 ****
-
- #if defined (__M68881__) && !defined (sfp004)
- # include <math-68881.h> /* mjr: use the inline functions */
- ! #endif __M68881__
-
- #define DEFPREC 6
-
- #define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */
-
- ! #define PUTC(ch) if( fputc(ch, fp) == EOF ) return EOF;
-
- !
- #define ARG(signtag) \
- _ulong = \
- flags&LONGINT ? \
- --- 78,107 ----
-
- #if defined (__M68881__) && !defined (sfp004)
- # include <math-68881.h> /* mjr: use the inline functions */
- ! #endif /* __M68881__ */
-
- #define DEFPREC 6
-
- #define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */
-
- ! #define PUTC(ch) if( (*putfunc)(ch, fp) == EOF ) return EOF;
-
- ! #ifdef PRINTF_LONGLONG
- ! #define ARG(signtag) (\
- ! (flags&LONGLONG ? \
- ! (_ulonglong = (unsigned long long)va_arg(argp, signtag long long)) : 0 ) ,\
- ! _ulong = \
- ! flags&LONGLONG ? \
- ! _ulonglong != 0ll : \
- ! flags&LONGINT ? \
- ! (unsigned long long)va_arg(argp, signtag long) : \
- ! (flags&SHORTINT ? \
- ! (unsigned long long)(signtag short)va_arg(argp, signtag int) : \
- ! (unsigned long long)va_arg(argp, signtag int)) )
- ! /* shorts are always promoted to ints; thus, it's `va_arg(... int)'
- ! * for `flags&SHORTINT'!
- ! */
- ! #else
- #define ARG(signtag) \
- _ulong = \
- flags&LONGINT ? \
- ***************
- *** 96,101 ****
- --- 112,118 ----
- /* shorts are always promoted to ints; thus, it's `va_arg(... int)'
- * for `flags&SHORTINT'!
- */
- + #endif
-
- #define TEN_MUL(X) ((((X) << 2) + (X)) << 1)
-
- ***************
- *** 103,114 ****
- #define tochar(n) ((n) + '0')
-
- #define LONGINT 0x01 /* long integer */
- ! #define LONGDBL 0x02 /* long double; unimplemented */
- ! #define SHORTINT 0x04 /* short integer */
- ! #define ALT 0x08 /* alternate form */
- ! #define LADJUST 0x10 /* left adjustment */
- ! #define ZEROPAD 0x20 /* zero (as opposed to blank) pad */
- ! #define HEXPREFIX 0x40 /* add 0x or 0X prefix */
-
- #ifndef __NO_FLOAT__
- #define __FLOATS__ 1
- --- 120,132 ----
- #define tochar(n) ((n) + '0')
-
- #define LONGINT 0x01 /* long integer */
- ! #define LONGLONG 0x02 /* long long integer (8 bytes) */
- ! #define LONGDBL 0x04 /* long double; unimplemented */
- ! #define SHORTINT 0x08 /* short integer */
- ! #define ALT 0x10 /* alternate form */
- ! #define LADJUST 0x20 /* left adjustment */
- ! #define ZEROPAD 0x40 /* zero (as opposed to blank) pad */
- ! #define HEXPREFIX 0x80 /* add 0x or 0X prefix */
-
- #ifndef __NO_FLOAT__
- #define __FLOATS__ 1
- ***************
- *** 197,205 ****
-
- #endif /* __GNUC__ */
-
-
- ! int _doprnt(fp, fmt0, argp)
- ! register FILE *fp;
- const char *fmt0;
- va_list argp;
- {
- --- 215,231 ----
-
- #endif /* __GNUC__ */
-
- + #ifdef PRINTF_LONGLONG
- + #define _ICONVLL(NUMBER, BASE, BUF) \
- + do { \
- + *--(BUF) = digs[(NUMBER) % (BASE)]; \
- + (NUMBER) /= (BASE); \
- + } while (NUMBER);
- + #endif
-
- ! int _doprnt(putfunc, fp, fmt0, argp)
- ! int (*putfunc) __PROTO ((int, FILE *));
- ! FILE *fp;
- const char *fmt0;
- va_list argp;
- {
- ***************
- *** 212,219 ****
- /* double _double; *//* double precision arguments %[eEfgG] */
- union double_di _dd; /* _double is #defined to be _dd later on */
- char softsign; /* temporary negative sign for floats */
- ! #endif __FLOATS__
- ! u_long _ulong; /* integer arguments %[diouxX] */
- short base; /* base for [diouxX] conversion */
- short dprec; /* decimal precision in [diouxX] */
- short fieldsz; /* field size expanded by sign, etc */
- --- 238,252 ----
- /* double _double; *//* double precision arguments %[eEfgG] */
- union double_di _dd; /* _double is #defined to be _dd later on */
- char softsign; /* temporary negative sign for floats */
- ! #endif /* __FLOATS__ */
- ! #ifdef PRINTF_LONGLONG
- ! typedef unsigned long long _ulonglongtype;
- ! typedef long long _ulonglongsignedtype;
- ! _ulonglongtype _ulonglong;
- ! #endif
- ! typedef u_long _ulongtype;
- ! typedef long _ulongsignedtype;
- ! _ulongtype _ulong; /* integer arguments %[diouxX] */
- short base; /* base for [diouxX] conversion */
- short dprec; /* decimal precision in [diouxX] */
- short fieldsz; /* field size expanded by sign, etc */
- ***************
- *** 227,233 ****
- char *digs; /* digits for [diouxX] conversion */
- char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */
-
- - t = buf;
- fmt = (const u_char *) fmt0;
- digs = "0123456789abcdef";
- for (cnt = 0;; ++fmt) {
- --- 260,265 ----
- ***************
- *** 307,313 ****
- flags |= SHORTINT;
- goto rflag;
- case 'l':
- ! flags |= LONGINT;
- goto rflag;
- case 'c':
- *(t = buf) = va_arg(argp, int);
- --- 339,350 ----
- flags |= SHORTINT;
- goto rflag;
- case 'l':
- ! #ifdef PRINTF_LONGLONG
- ! if (flags & (LONGINT|LONGLONG))
- ! flags &= -1-LONGINT, flags |= LONGLONG;
- ! else
- ! #endif
- ! flags |= LONGINT;
- goto rflag;
- case 'c':
- *(t = buf) = va_arg(argp, int);
- ***************
- *** 315,329 ****
- sign = '\0';
- goto pforw;
- case 'D':
- ! flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'd':
- case 'i':
- ARG(signed);
- ! if ((long)_ulong < 0) {
- ! _ulong = -_ulong;
- ! sign = '-';
- }
- base = 10;
- goto number;
- #ifdef __FLOATS__
- --- 352,380 ----
- sign = '\0';
- goto pforw;
- case 'D':
- ! #ifdef PRINTF_LONGLONG
- ! if (flags & (LONGINT|LONGLONG))
- ! flags &= -1-LONGINT, flags |= LONGLONG;
- ! else
- ! #endif
- ! flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'd':
- case 'i':
- ARG(signed);
- ! #ifdef PRINTF_LONGLONG
- ! if (flags & LONGLONG) {
- ! if ((_ulonglongsignedtype)_ulonglong < 0ll) {
- ! _ulonglong = -_ulonglong;
- ! sign = '-';
- ! }
- }
- + else
- + #endif
- + if ((_ulongsignedtype)_ulong < 0) {
- + _ulong = -(long)_ulong;
- + sign = '-';
- + }
- base = 10;
- goto number;
- #ifdef __FLOATS__
- ***************
- *** 411,416 ****
- --- 462,472 ----
- goto pforw;
- #endif /* __FLOATS__ */
- case 'n':
- + #ifdef PRINTF_LONGLONG
- + if (flags & LONGLONG)
- + *va_arg(argp, long long *) = cnt;
- + else
- + #endif
- if (flags & LONGINT)
- *va_arg(argp, long *) = cnt;
- else if (flags & SHORTINT)
- ***************
- *** 419,425 ****
- *va_arg(argp, int *) = cnt;
- break;
- case 'O':
- ! flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'o':
- ARG(unsigned);
- --- 475,486 ----
- *va_arg(argp, int *) = cnt;
- break;
- case 'O':
- ! #ifdef PRINTF_LONGLONG
- ! if (flags & (LONGINT|LONGLONG))
- ! flags &= -1-LONGINT, flags |= LONGLONG;
- ! else
- ! #endif
- ! flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'o':
- ARG(unsigned);
- ***************
- *** 434,440 ****
- * -- ANSI X3J11
- */
- /* NOSTRICT */
- ! _ulong = (u_long)va_arg(argp, void *);
- base = 16;
- goto nosign;
- case 's':
- --- 495,504 ----
- * -- ANSI X3J11
- */
- /* NOSTRICT */
- ! _ulong = (_ulongtype)va_arg(argp, void *);
- ! #ifdef PRINTF_LONGLONG
- ! flags &= -1-LONGLONG;
- ! #endif
- base = 16;
- goto nosign;
- case 's':
- ***************
- *** 454,460 ****
- #endif
-
- if ((p = (char *)memchr(t, 0, (size_t)prec)) != NULL) {
- ! size = p - t;
- if (size > prec)
- size = prec;
- } else
- --- 518,524 ----
- #endif
-
- if ((p = (char *)memchr(t, 0, (size_t)prec)) != NULL) {
- ! size = (short)(p - t);
- if (size > prec)
- size = prec;
- } else
- ***************
- *** 464,470 ****
- sign = '\0';
- goto pforw;
- case 'U':
- ! flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'u':
- ARG(unsigned);
- --- 528,539 ----
- sign = '\0';
- goto pforw;
- case 'U':
- ! #ifdef PRINTF_LONGLONG
- ! if (flags & (LONGINT|LONGLONG))
- ! flags &= -1-LONGINT, flags |= LONGLONG;
- ! else
- ! #endif
- ! flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'u':
- ARG(unsigned);
- ***************
- *** 477,482 ****
- --- 546,553 ----
- ARG(unsigned);
- base = 16;
- /* leading 0x/X only if non-zero */
- + /* Note: this does also work with _ulonglong, as we set
- + _ulong = 0 iff _ulonglong==0 --bjarne */
- if (flags & ALT && _ulong != 0)
- flags |= HEXPREFIX;
-
- ***************
- *** 496,508 ****
- * -- ANSI X3J11
- */
- t = buf + BUF;
- if (_ulong != 0 || prec != 0) {
- ! _ICONV(_ulong, base, t);
- digs = "0123456789abcdef";
- if (flags & ALT && base == 8 && *t != '0')
- *--t = '0'; /* octal leading 0 */
- }
- ! size = buf + BUF - t;
-
- pforw:
- /*
- --- 567,591 ----
- * -- ANSI X3J11
- */
- t = buf + BUF;
- + /* Note: this does also work with _ulonglong, as we set
- + _ulong = 0 iff _ulonglong==0 --bjarne */
- if (_ulong != 0 || prec != 0) {
- ! #ifdef PRINTF_LONGLONG
- ! if (flags & LONGLONG) {
- ! _ICONVLL(_ulonglong, base, t);
- ! }
- ! /* As _ICONVLL might be a macro, we better put it in braces */
- ! else
- ! #endif
- ! {
- ! _ICONV(_ulong, base, t);
- ! }
- ! /* As _ICONV might be a macro, we better put it in braces */
- digs = "0123456789abcdef";
- if (flags & ALT && base == 8 && *t != '0')
- *--t = '0'; /* octal leading 0 */
- }
- ! size = (short)(buf + BUF - t);
-
- pforw:
- /*
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fdopen.c,v
- retrieving revision 1.12
- diff -c -r1.12 fdopen.c
- *** 1.12 1992/08/14 14:48:29
- --- fdopen.c 1993/10/26 23:52:27
- ***************
- *** 7,13 ****
-
- FILE *fdopen(h, mode)
- register int h;
- ! const register char *mode;
- {
- extern int __default_mode__; /* see defmode.c */
- register int i, iomode = 0, f = __default_mode__;
- --- 7,13 ----
-
- FILE *fdopen(h, mode)
- register int h;
- ! register const char *mode;
- {
- extern int __default_mode__; /* see defmode.c */
- register int i, iomode = 0, f = __default_mode__;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/ffs.c,v
- retrieving revision 1.2
- diff -c -r1.2 ffs.c
- *** 1.2 1993/07/13 17:03:40
- --- ffs.c 1993/10/26 23:52:28
- ***************
- *** 1,8 ****
- /*
- ! ffs.c - find first set bit
- ! Carmine T. Guida
- ! 7 - 7 - 93 Public Domain
- ! */
-
- #include <support.h>
-
- --- 1,10 ----
- /*
- ! * ffs.c - find the lowest bit set
- ! * Returns a 2-exponent of position + 1 and 0 for 0
- ! * Michal Jaegermann, <ntomczak@vm.ucs.ualberta.ca>
- ! * 10 July 1993
- ! * This piece of code is in a Public Domain
- ! */
-
- #include <support.h>
-
- ***************
- *** 10,47 ****
- ffs(bits)
- int bits;
- {
- ! register int i;
-
- ! if (!bits)
- ! return 0;
-
- ! i = 1;
- !
- #ifndef __MSHORT__
- ! if (!(bits & 0x0000FFFF)) /* Check word */
- ! {
- ! bits >>= 16;
- ! i += 16;
- ! }
- ! #endif
- !
- ! if (!(bits & 0x00FF)) /* Check byte */
- ! {
- ! bits >>= 8;
- ! i += 8;
- ! }
- ! if (!(bits & 0x0F)) /* Check nybble */
- ! {
- ! bits >>= 4;
- ! i += 4;
- ! }
- ! if (!(bits & 0x3)) /* Check 2 bits */
- ! {
- ! bits >>= 2;
- ! i += 2;
- ! }
- ! if (!(bits & 0x1)) /* Check bit */
- ! i += 1;
- !
- ! return i;
- }
- --- 12,41 ----
- ffs(bits)
- int bits;
- {
- ! register int count;
-
- ! if (0 == bits)
- ! return 0;
-
- ! bits &= -bits;
- #ifndef __MSHORT__
- ! count = (bits & 0x0000ffff ? 16 : 32);
- ! if (bits & 0x00ff00ff)
- ! count -= 8;
- ! if (bits & 0x0f0f0f0f)
- ! count -= 4;
- ! if (bits & 0x33333333)
- ! count -= 2;
- ! if (bits & 0x55555555)
- ! count -= 1;
- ! #else
- ! count = (bits & 0x00ff ? 8 : 16);
- ! if (bits & 0x0f0f)
- ! count -= 4;
- ! if (bits & 0x3333)
- ! count -= 2;
- ! if (bits & 0x5555)
- ! count -= 1;
- ! #endif /* __MSHORT__ */
- ! return count;
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/findfile.c,v
- retrieving revision 1.13
- diff -c -r1.13 findfile.c
- *** 1.13 1993/07/13 17:03:43
- --- findfile.c 1993/10/26 23:52:30
- ***************
- *** 27,39 ****
- #define DIRSEP1 '\\' /* native OS directory separator */
- #define DIRSEP2 '/' /* for emulating another OS */
-
- ! static char *nullext[] = { NULL };
-
- ! static int EXISTS __PROTO((char *));
-
- static int
- EXISTS(name)
- ! char *name;
- {
- struct stat dummy;
-
- --- 27,39 ----
- #define DIRSEP1 '\\' /* native OS directory separator */
- #define DIRSEP2 '/' /* for emulating another OS */
-
- ! static char *const nullext[] = { NULL };
-
- ! static int EXISTS __PROTO((const char *));
-
- static int
- EXISTS(name)
- ! const char *name;
- {
- struct stat dummy;
-
- ***************
- *** 47,53 ****
-
- char *
- findfile(fname, fpath, fext)
- ! char *fname, *fpath, **fext;
- {
- /* simply calls buffindfile */
- static char try[PATH_MAX];
- --- 47,54 ----
-
- char *
- findfile(fname, fpath, fext)
- ! const char *fname, *fpath;
- ! char *const *fext;
- {
- /* simply calls buffindfile */
- static char try[PATH_MAX];
- ***************
- *** 57,65 ****
-
- char *
- buffindfile(fname, fpath, fext, try)
- ! char *fname, *fpath, **fext, *try;
- {
- ! char *s, *t, *extplace, **nextext, c;
- int hasext = 0, haspath = 0;
-
- if (!fname || !*fname)
- --- 58,68 ----
-
- char *
- buffindfile(fname, fpath, fext, try)
- ! const char *fname, *fpath;
- ! char *const *fext, *try;
- {
- ! char *s, *extplace, *const *nextext, c;
- ! const char *t;
- int hasext = 0, haspath = 0;
-
- if (!fname || !*fname)
- ***************
- *** 82,88 ****
- *s++ = c;
- }
- extplace = s;
- ! *s++ = 0;
-
- if (haspath || !fpath)
- fpath = "";
- --- 85,91 ----
- *s++ = c;
- }
- extplace = s;
- ! *s = 0;
-
- if (haspath || !fpath)
- fpath = "";
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fopen.c,v
- retrieving revision 1.20
- diff -c -r1.20 fopen.c
- *** 1.20 1993/07/10 16:36:41
- --- fopen.c 1993/10/26 23:52:31
- ***************
- *** 65,71 ****
- else
- iomode |= O_RDWR;
- iomode |= O_NOCTTY;
- ! h = open(filename, iomode, 0644);
- if(h < __SMALLEST_VALID_HANDLE)
- {
- return(NULL); /* file open/create error */
- --- 65,71 ----
- else
- iomode |= O_RDWR;
- iomode |= O_NOCTTY;
- ! h = open(filename, iomode, 0666);
- if(h < __SMALLEST_VALID_HANDLE)
- {
- return(NULL); /* file open/create error */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fprintf.c,v
- retrieving revision 1.15
- diff -c -r1.15 fprintf.c
- *** 1.15 1992/06/01 01:54:10
- --- fprintf.c 1993/10/26 23:52:33
- ***************
- *** 15,53 ****
- va_list args;
-
- va_start(args, fmt);
- ! r = _doprnt(fp, fmt, args);
- va_end(args);
- return r;
- }
- -
- - int
- - vfprintf(fp, fmt, args)
- - FILE *fp;
- - const char *fmt;
- - va_list args;
- - {
- - return(_doprnt(fp, fmt, args));
- - }
- -
- - #if __STDC__
- - int printf(const char *fmt, ...)
- - #else
- - int printf(fmt) const char *fmt;
- - #endif
- - {
- - va_list args;
- - int r;
- -
- - va_start(args, fmt);
- - r = _doprnt(stdout, fmt, args);
- - va_end(args);
- - return r;
- - }
- -
- - int
- - vprintf(fmt, args)
- - const char *fmt;
- - va_list args;
- - {
- - return(_doprnt(stdout, fmt, args));
- - }
- --- 15,21 ----
- va_list args;
-
- va_start(args, fmt);
- ! r = _doprnt(fputc, fp, fmt, args);
- va_end(args);
- return r;
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fputs.c,v
- retrieving revision 1.4
- diff -c -r1.4 fputs.c
- *** 1.4 1989/03/25 04:18:02
- --- fputs.c 1993/10/26 23:52:34
- ***************
- *** 5,11 ****
- #include <assert.h>
-
- int fputs(data, fp)
- ! const register char *data;
- register FILE *fp;
- {
- register int n = 0;
- --- 5,11 ----
- #include <assert.h>
-
- int fputs(data, fp)
- ! register const char *data;
- register FILE *fp;
- {
- register int n = 0;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/frexp.cpp,v
- retrieving revision 1.8
- diff -c -r1.8 frexp.cpp
- *** 1.8 1993/07/13 17:03:44
- --- frexp.cpp 1993/10/26 23:52:36
- ***************
- *** 63,69 ****
- | sign of zero is correct
- subw #BIAS8,d0 | remove bias
- #ifdef __MSHORT__
- ! addw d0,a0 | add current exponent in
- #else
- extl d0
- addl d0,a0@ | add current exponent in
- --- 63,69 ----
- | sign of zero is correct
- subw #BIAS8,d0 | remove bias
- #ifdef __MSHORT__
- ! addw d0,a0@ | add current exponent in
- #else
- extl d0
- addl d0,a0@ | add current exponent in
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/getpass.c,v
- retrieving revision 1.4
- diff -c -r1.4 getpass.c
- *** 1.4 1993/02/22 06:15:12
- --- getpass.c 1993/10/26 23:52:37
- ***************
- *** 14,20 ****
- char *ret;
- struct sgttyb oldsb, newsb;
- FILE *tty;
- ! int ttyfd = 0;
-
- fflush(stdin);
- tty = stdin;
- --- 14,20 ----
- char *ret;
- struct sgttyb oldsb, newsb;
- FILE *tty;
- ! int ttyfd;
-
- fflush(stdin);
- tty = stdin;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/getpw.c,v
- retrieving revision 1.13
- diff -c -r1.13 getpw.c
- *** 1.13 1993/07/10 16:36:45
- --- getpw.c 1993/10/26 23:52:39
- ***************
- *** 205,210 ****
- --- 205,211 ----
- #include <unistd.h>
- #include <string.h>
- #include <stdlib.h>
- + #include <types.h>
-
- static char *pwdfile = "/etc/passwd"; /* default passwd file */
-
- ***************
- *** 289,296 ****
- } /* End of getpwent() */
-
- /* Get first passwd entry from file with pw_uid matching uid */
- struct passwd *getpwuid(uid)
- ! int uid;
- {
- setpwent();
- while (nextent(fp) != 0)
- --- 290,301 ----
- } /* End of getpwent() */
-
- /* Get first passwd entry from file with pw_uid matching uid */
- + #ifdef __STDC__
- + struct passwd *getpwuid(uid_t uid)
- + #else
- struct passwd *getpwuid(uid)
- ! uid_t uid;
- ! #endif
- {
- setpwent();
- while (nextent(fp) != 0)
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/gnulib2.c,v
- retrieving revision 1.14
- diff -c -r1.14 gnulib2.c
- *** 1.14 1992/11/08 00:02:51
- --- gnulib2.c 1993/09/15 16:12:53
- ***************
- *** 88,94 ****
- /* Define this if most significant word of a multiword number is numbered. */
- /* For 68000 we can decide arbitrarily
- since there are no machine instructions for them. */
- ! /* #define WORDS_BIG_ENDIAN */
-
- /* number of bits in an addressible storage unit */
- #define BITS_PER_UNIT 8
- --- 88,94 ----
- /* Define this if most significant word of a multiword number is numbered. */
- /* For 68000 we can decide arbitrarily
- since there are no machine instructions for them. */
- ! #define WORDS_BIG_ENDIAN
-
- /* number of bits in an addressible storage unit */
- #define BITS_PER_UNIT 8
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/lib.h,v
- retrieving revision 1.10
- diff -c -r1.10 lib.h
- *** 1.10 1993/07/10 16:36:48
- --- lib.h 1993/10/26 23:52:40
- ***************
- *** 43,61 ****
- __EXTERN char * _ltoa __PROTO((long, char *, int));
- __EXTERN char * _ultoa __PROTO((unsigned long, char *, int));
-
- ! __EXTERN int _doprnt __PROTO((FILE *, const char *, __VA_LIST__));
-
- #ifdef __MINT__
- ! __EXTERN int _scanf __PROTO((void *, int (*)(void *),
- ! int (*)(int, void *), unsigned char *, __VA_LIST__));
- #endif
-
- __EXTERN long get_sysvar __PROTO((void *var));
- __EXTERN void set_sysvar_to_long __PROTO((void *var, long val));
-
- ! __EXTERN void _setstack __PROTO((char *));
- ! __EXTERN __EXITING __exit __PROTO((long status));
-
- /* from the TOS GCC library */
- /* 5/5/92 sb -- definitions needed in malloc.c and realloc.c */
-
- --- 43,69 ----
- __EXTERN char * _ltoa __PROTO((long, char *, int));
- __EXTERN char * _ultoa __PROTO((unsigned long, char *, int));
-
- ! __EXTERN int _doprnt __PROTO((int (*)(int, FILE *), FILE *, const char *, __VA_LIST__));
-
- #ifdef __MINT__
- ! __EXTERN int _scanf __PROTO((FILE *, int (*)(FILE *),
- ! int (*)(int, FILE *), const char *, __VA_LIST__));
- #endif
-
- __EXTERN long get_sysvar __PROTO((void *var));
- __EXTERN void set_sysvar_to_long __PROTO((void *var, long val));
-
- ! __EXTERN void _main __PROTO((long, char **, char **));
- ! __EXTERN void _init_signal __PROTO((void));
- ! __EXTERN void _monstartup __PROTO((void *lowpc, void *highpc));
- ! __EXTERN void __mcleanup __PROTO((void));
- ! __EXTERN void _moncontrol __PROTO((long));
- ! __EXTERN void _setstack __PROTO((char *));
- ! __EXTERN void _crtinit __PROTO((void));
- ! __EXTERN void _acc_main __PROTO((void));
- ! __EXTERN __EXITING __exit __PROTO((long status));
-
- + __EXTERN void _fclose_all_files __PROTO((void));
- /* from the TOS GCC library */
- /* 5/5/92 sb -- definitions needed in malloc.c and realloc.c */
-
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/localtim.c,v
- retrieving revision 1.15
- diff -c -r1.15 localtim.c
- *** 1.15 1992/09/14 14:56:40
- --- localtim.c 1993/10/26 23:52:42
- ***************
- *** 228,234 ****
- char *s;
- int *hasdst;
- {
- ! time_t off = 0;
- int x, sgn = 1;
- static char stdname[TZNAMLEN+1], dstname[TZNAMLEN+1];
- static char unknwn[4] = "???";
- --- 228,234 ----
- char *s;
- int *hasdst;
- {
- ! time_t off;
- int x, sgn = 1;
- static char stdname[TZNAMLEN+1], dstname[TZNAMLEN+1];
- static char unknwn[4] = "???";
- ***************
- *** 245,251 ****
- while (*s && isalpha(*s)) {
- *n++ = *s++; /* skip name */
- }
- ! *n++ = 0;
-
- /* now figure out the offset */
-
- --- 245,251 ----
- while (*s && isalpha(*s)) {
- *n++ = *s++; /* skip name */
- }
- ! *n = 0;
-
- /* now figure out the offset */
-
- ***************
- *** 274,280 ****
- *hasdst = 1;
- while (*s && isalpha(*s)) *n++ = *s++;
- }
- ! *n++ = 0;
-
- if (stdname[0])
- tzname[0] = stdname;
- --- 274,280 ----
- *hasdst = 1;
- while (*s && isalpha(*s)) *n++ = *s++;
- }
- ! *n = 0;
-
- if (stdname[0])
- tzname[0] = stdname;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/lseek.c,v
- retrieving revision 1.10
- diff -c -r1.10 lseek.c
- *** 1.10 1992/09/14 14:56:40
- --- lseek.c 1993/10/26 23:52:45
- ***************
- *** 8,28 ****
- #include <unistd.h>
- #include "lib.h"
-
- - static long _real_lseek __PROTO((int, long, int));
- -
- - static long _real_lseek(h, where, how)
- - int h;
- - long where;
- - int how;
- - {
- - register long rv;
- -
- - rv = Fseek(where, h, how);
- - if(rv < 0)
- - errno = ((int) -rv);
- - return(rv);
- - }
- -
- /*
- * emulate berzerkly lseek too
- */
- --- 8,13 ----
- ***************
- *** 38,58 ****
-
- if ( (mode == SEEK_END) || (offset <= 0) )
- /* do it the usual way */
- ! return(_real_lseek(handle, offset, mode));
-
- ! current_pos = _real_lseek(handle, 0L, SEEK_CUR); /* find out where we are */
- if (mode == SEEK_SET)
- expected_pos = offset;
- else
- expected_pos = offset + current_pos;
- ! new_pos = _real_lseek(handle, offset, mode);
- if (new_pos == expected_pos)
- return(new_pos);
-
- /* otherwise extend file -- zero filling the hole */
- if (new_pos < 0) /* error? */
- {
- ! new_pos = _real_lseek(handle, 0L, SEEK_END); /* go to eof */
- }
-
- bzero(buf, (size_t)256);
- --- 23,58 ----
-
- if ( (mode == SEEK_END) || (offset <= 0) )
- /* do it the usual way */
- ! {
- ! current_pos = Fseek (offset, handle, mode);
- ! if (current_pos < 0)
- ! {
- ! errno = (int) -current_pos;
- ! return -1L;
- ! }
- ! return current_pos;
- ! }
-
- ! current_pos = Fseek (0L, handle, SEEK_CUR); /* find out where we are */
- ! if (current_pos < 0)
- ! {
- ! /* a real error, e.g. an unseekable device */
- ! errno = (int) -current_pos;
- ! return -1L;
- ! }
- !
- if (mode == SEEK_SET)
- expected_pos = offset;
- else
- expected_pos = offset + current_pos;
- ! new_pos = Fseek (offset, handle, mode);
- if (new_pos == expected_pos)
- return(new_pos);
-
- /* otherwise extend file -- zero filling the hole */
- if (new_pos < 0) /* error? */
- {
- ! new_pos = Fseek (0L, handle, SEEK_END); /* go to eof */
- }
-
- bzero(buf, (size_t)256);
- ***************
- *** 63,69 ****
- offset = 256;
- if((current_pos = _write(handle, buf, offset)) != offset)
- return((current_pos > 0) ? (new_pos + current_pos) :
- ! new_pos); /* errno set by write */
- new_pos += offset;
- }
- return(new_pos);
- --- 63,69 ----
- offset = 256;
- if((current_pos = _write(handle, buf, offset)) != offset)
- return((current_pos > 0) ? (new_pos + current_pos) :
- ! -1L); /* errno set by write */
- new_pos += offset;
- }
- return(new_pos);
- ***************
- *** 72,76 ****
- long tell(h)
- int h;
- {
- ! return(_real_lseek(h, 0L, SEEK_CUR));
- }
- --- 72,84 ----
- long tell(h)
- int h;
- {
- ! register long rv;
- !
- ! rv = Fseek(0L, h, SEEK_CUR);
- ! if(rv < 0)
- ! {
- ! errno = ((int) -rv);
- ! return -1L;
- ! }
- ! return(rv);
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/malloc.c,v
- retrieving revision 1.23
- diff -c -r1.23 malloc.c
- *** 1.23 1992/10/09 20:35:29
- --- malloc.c 1993/10/26 23:52:46
- ***************
- *** 70,75 ****
- --- 70,82 ----
- if (MINHUNK < MAXHUNK)
- MINHUNK *= 2;
- }
- + if (_split_mem || _heapbase == NULL)
- + {
- + static int page_size = 0;
- + if (!page_size)
- + page_size = getpagesize ();
- + sz = (sz + page_size - 1) & -page_size;
- + }
- q = (struct mem_chunk * )_sbrk(sz);
-
- if (((long)q) == -1) /* can't alloc any more? */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/mktemp.c,v
- retrieving revision 1.13
- diff -c -r1.13 mktemp.c
- *** 1.13 1992/06/01 01:54:10
- --- mktemp.c 1993/10/26 23:52:48
- ***************
- *** 27,36 ****
-
- /* scan back over X's */
- for(p = pattern; *p; p++) ;
- ! for(q = --p; *q == 'X'; --q) ;
- if((nx = p - q) == 0) /* # of X's */
- return NULL;
- - q++;
-
- /* if MiNT is active and there's room, put in the pid */
- /* we need 5 X's for this: up to 3 for the pid, and up to 2 for the
- --- 27,35 ----
-
- /* scan back over X's */
- for(p = pattern; *p; p++) ;
- ! for(q = p; q[-1] == 'X'; --q) ;
- if((nx = p - q) == 0) /* # of X's */
- return NULL;
-
- /* if MiNT is active and there's room, put in the pid */
- /* we need 5 X's for this: up to 3 for the pid, and up to 2 for the
- ***************
- *** 38,44 ****
- --- 37,47 ----
- if (__mint && nx > 4 && startat < 256) {
- (void) _itoa(getpid(), q, 10);
- while (*q) q++;
- + /* be sure to generate each name only once */
- + if (startat < 16) *q++ = '0';
- (void) _itoa(startat++, q, 16);
- + while (*q) q++;
- + while (q < p) *q++ = '0'; /* fill with zeros */
- return pattern;
- }
-
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/pgrp.c,v
- retrieving revision 1.2
- diff -c -r1.2 pgrp.c
- *** 1.2 1993/07/10 16:36:50
- --- pgrp.c 1993/10/26 23:52:51
- ***************
- *** 45,51 ****
- _bsd_getpgrp(pid)
- int pid;
- {
- ! if (__mint >= 103) return _bsd_setpgrp(pid, -1);
- return 0;
- }
-
- --- 45,51 ----
- _bsd_getpgrp(pid)
- int pid;
- {
- ! if (__mint >= 0x103) return _bsd_setpgrp(pid, -1);
- return 0;
- }
-
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/putenv.c,v
- retrieving revision 1.3
- diff -c -r1.3 putenv.c
- *** 1.3 1993/07/10 16:36:53
- --- putenv.c 1993/10/26 23:52:54
- ***************
- *** 7,12 ****
- --- 7,13 ----
- #ifndef _COMPILER_H
- #include <compiler.h>
- #endif
- + #include <support.h>
-
- extern char ** environ;
-
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/qsort.c,v
- retrieving revision 1.14
- diff -c -r1.14 qsort.c
- *** 1.14 1992/09/14 14:56:40
- --- qsort.c 1993/10/26 23:52:55
- ***************
- *** 21,38 ****
- #include <string.h>
- #include <memory.h>
-
- #ifdef __GNUC__
- # ifdef minix
- void *alloca(unsigned long);
- typedef unsigned long size_t;
- # endif
- ! # define INLINE inline
- #else
- # define INLINE /* */
- #endif
- - #ifndef _COMPILER_H
- - #include <compiler.h>
- - #endif
-
- /* macros for incrementing/decrementing void pointers */
- #define INC(v, size) v = (void *)(((char *)v) + size)
- --- 21,43 ----
- #include <string.h>
- #include <memory.h>
-
- + #ifndef _COMPILER_H
- + #include <compiler.h>
- + #endif
- +
- #ifdef __GNUC__
- # ifdef minix
- void *alloca(unsigned long);
- typedef unsigned long size_t;
- # endif
- ! # ifdef __GNUC_INLINE__
- ! # define INLINE inline
- ! # else
- ! # define INLINE /* */
- ! # endif
- #else
- # define INLINE /* */
- #endif
-
- /* macros for incrementing/decrementing void pointers */
- #define INC(v, size) v = (void *)(((char *)v) + size)
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/setjmp.cpp,v
- retrieving revision 1.6
- diff -c -r1.6 setjmp.cpp
- *** 1.6 1993/07/10 16:37:02
- --- setjmp.cpp 1993/10/26 23:52:57
- ***************
- *** 18,48 ****
- _sigsetjmp:
- movel sp@(4), a0 | address of sigjmp_buf[]
- #ifdef __MSHORT__
- ! movew sp@(8), d0
- ! extl d0
- #else
- ! movel sp@(8), d0
- #endif
- ! movel d0, a0@(56) | save sigmask for siglongjmp?
- beq SETJMP | no -- call common code
- ! movel Sigmask, a0@(52) | save tos emulation signal mask
- #ifdef __MSHORT__
- tstw Mint | see if MiNT is active
- #else
- tstl Mint
- #endif
- ! beq SETJMP | no -- call common code
- ! movel #0, sp@- | add no signals to sigmask
- movew #0x116, sp@- | Psigblock() system call
- trap #1 |
- addqw #6, sp
- ! movel d0, a0@(52) | save MiNT signal mask
- ! jmp SETJMP | call common code
-
- .globl _setjmp
- _setjmp:
- movel sp@(4),a0 | address of jmp_buf[]
- ! movel #0, a0@(56) | do not restore sigmask on longjmp
- SETJMP:
- movel sp@,a0@ | save return address
- moveml d2-d7/a2-a7,a0@(4) | save registers d2-d7/a2-a7
- --- 18,49 ----
- _sigsetjmp:
- movel sp@(4), a0 | address of sigjmp_buf[]
- #ifdef __MSHORT__
- ! movew sp@(8), a1
- #else
- ! movel sp@(8), a1
- #endif
- ! movel a1, a0@(52) | save sigmask for siglongjmp?
- beq SETJMP | no -- call common code
- ! movel Sigmask, d0 | save tos emulation signal mask
- #ifdef __MSHORT__
- tstw Mint | see if MiNT is active
- #else
- tstl Mint
- #endif
- ! beq nomint | no -- call common code
- ! clrl sp@- | add no signals to sigmask
- movew #0x116, sp@- | Psigblock() system call
- trap #1 |
- addqw #6, sp
- ! nomint:
- ! orw #1,d0 | make it != 0 (SIGNULL is unmaskable)
- ! movel d0, a0@(52) | save signal mask
- ! bra SETJMP | call common code
-
- .globl _setjmp
- _setjmp:
- movel sp@(4),a0 | address of jmp_buf[]
- ! clrl a0@(52) | do not restore sigmask on longjmp
- SETJMP:
- movel sp@,a0@ | save return address
- moveml d2-d7/a2-a7,a0@(4) | save registers d2-d7/a2-a7
- ***************
- *** 64,79 ****
- addqw #2, sp
- NOMINT:
- movel sp@(4),a0 | address of jmp_buf[]
- ! tstl a0@(56) | want to restore sigmask?
- beq NORESTORE | no -- skip restore code
- ! movel a0@(52), Sigmask | restore tos emulation signal mask
- #ifdef __MSHORT__
- tstw Mint | see if MiNT is active
- #else
- tstl Mint
- #endif
- beq NORESTORE | no -- do not call sigsetmask
- ! movel a0@(52), sp@- | restore signal mask
- movew #0x117, sp@- | Psigsetmask() system call
- trap #1 |
- addqw #6, sp
- --- 65,81 ----
- addqw #2, sp
- NOMINT:
- movel sp@(4),a0 | address of jmp_buf[]
- ! movel a0@(52),d0 | want to restore sigmask?
- beq NORESTORE | no -- skip restore code
- ! andw #-2,d0
- ! movel d0, Sigmask | restore tos emulation signal mask
- #ifdef __MSHORT__
- tstw Mint | see if MiNT is active
- #else
- tstl Mint
- #endif
- beq NORESTORE | no -- do not call sigsetmask
- ! movel d0, sp@- | restore signal mask
- movew #0x117, sp@- | Psigsetmask() system call
- trap #1 |
- addqw #6, sp
- ***************
- *** 84,90 ****
- movel sp@(8),d0 | value to return
- #endif
- bne L1 | may not be 0
- ! movl #1, d0
- L1:
- moveml a0@(4),d2-d7/a2-a7 | restore saved reggies
- movl a0@,sp@ | and the saved return address
- --- 86,92 ----
- movel sp@(8),d0 | value to return
- #endif
- bne L1 | may not be 0
- ! movql #1, d0
- L1:
- moveml a0@(4),d2-d7/a2-a7 | restore saved reggies
- movl a0@,sp@ | and the saved return address
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/sprintf.c,v
- retrieving revision 1.9
- diff -c -r1.9 sprintf.c
- *** 1.9 1992/09/14 14:56:40
- --- sprintf.c 1993/10/26 23:52:58
- ***************
- *** 3,15 ****
- #include <limits.h>
- #include "lib.h"
-
- ! #ifndef __GNUC__
- ! static FILE dummyf =
- ! {0L, (unsigned char *)0, (unsigned char *)0,
- ! _IOWRT|_IOBIN|_IOSTRING|_IOFBF, 0, LONG_MAX, '\0'};
- ! #endif
-
- ! __EXTERN int _doprnt __PROTO((FILE *file, const char *fmt, va_list argp));
-
- #ifdef __STDC__
- int sprintf(char *buf, const char *fmt, ...)
- --- 3,19 ----
- #include <limits.h>
- #include "lib.h"
-
- ! static int sputc __PROTO((int ch, FILE *fp));
-
- ! static int
- ! sputc (ch, fp)
- ! int ch;
- ! FILE *fp;
- ! {
- ! char **bufp = (char **) fp;
- ! *(*bufp)++ = ch;
- ! return ch;
- ! }
-
- #ifdef __STDC__
- int sprintf(char *buf, const char *fmt, ...)
- ***************
- *** 21,40 ****
- {
- register int n;
- va_list argp;
- ! #ifdef __GNUC__
- ! FILE sf =
- ! {0L, (unsigned char *)buf, (unsigned char *)buf,
- ! _IOWRT|_IOBIN|_IOSTRING|_IOFBF, 0, LONG_MAX,'\0'};
- ! #else
- ! FILE sf;
- !
- ! sf = dummyf;
- ! sf._ptr = sf._base = (unsigned char *)buf;
- ! #endif
- !
- va_start(argp, fmt);
- ! n = _doprnt(&sf, fmt, argp);
- ! *(sf._ptr) = '\0'; /* always tie of the string */
- return(n);
- }
-
- --- 25,34 ----
- {
- register int n;
- va_list argp;
- !
- va_start(argp, fmt);
- ! n = _doprnt(sputc, (FILE *) &buf, fmt, argp);
- ! *buf = '\0'; /* always tie of the string */
- return(n);
- }
-
- ***************
- *** 44,60 ****
- va_list args;
- {
- register int n;
- ! #ifdef __GNUC__
- ! FILE sf =
- ! {0L, (unsigned char *)buf, (unsigned char *)buf,
- ! _IOWRT|_IOBIN|_IOSTRING|_IOFBF, 0, LONG_MAX,'\0'};
- ! #else
- ! FILE sf;
- !
- ! sf = dummyf;
- ! sf._ptr = sf._base = (unsigned char *)buf;
- ! #endif
- ! n = _doprnt(&sf, fmt, args);
- ! *(sf._ptr) = '\0'; /* always tie of the string */
- return(n);
- }
- --- 38,44 ----
- va_list args;
- {
- register int n;
- ! n = _doprnt(sputc, (FILE *) &buf, fmt, args);
- ! *buf = '\0'; /* always tie of the string */
- return(n);
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/strcmp.c,v
- retrieving revision 1.3
- diff -c -r1.3 strcmp.c
- *** 1.3 1990/02/27 21:25:15
- --- strcmp.c 1993/10/26 23:53:00
- ***************
- *** 2,7 ****
- --- 2,10 ----
- /* modified by ERS */
-
- #include <string.h>
- + #ifdef __LATTICE__
- + #undef strcmp
- + #endif
-
- /*
- * strcmp - compare string s1 to s2
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/strftime.c,v
- retrieving revision 1.8
- diff -c -r1.8 strftime.c
- *** 1.8 1993/03/01 17:34:40
- --- strftime.c 1993/10/26 23:53:02
- ***************
- *** 38,44 ****
- const struct tm *ts;
- {
- long num = 0;
- ! long len = 0;
- int n;
- char q;
- char buf[BIG_LEN], *putstr, *s;
- --- 38,44 ----
- const struct tm *ts;
- {
- long num = 0;
- ! long len;
- int n;
- char q;
- char buf[BIG_LEN], *putstr, *s;
- ***************
- *** 165,171 ****
- s = putstr;
- while (*s && isalpha(*s))
- s++;
- ! *s++ = 0;
- }
- else
- buf[0] = '\0'; /* empty string */
- --- 165,171 ----
- s = putstr;
- while (*s && isalpha(*s))
- s++;
- ! *s = 0;
- }
- else
- buf[0] = '\0'; /* empty string */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/strncat.c,v
- retrieving revision 1.5
- diff -c -r1.5 strncat.c
- *** 1.5 1992/09/14 14:56:40
- --- strncat.c 1993/10/26 23:53:03
- ***************
- *** 21,27 ****
- count = n;
- while ((c = *sscan++) != '\0' && --count >= 0)
- *dscan++ = c;
- ! *dscan++ = '\0';
- }
- return(dst);
- }
- --- 21,27 ----
- count = n;
- while ((c = *sscan++) != '\0' && --count >= 0)
- *dscan++ = c;
- ! *dscan = '\0';
- }
- return(dst);
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/utime.c,v
- retrieving revision 1.12
- diff -c -r1.12 utime.c
- *** 1.12 1993/06/04 19:55:54
- --- utime.c 1993/10/26 23:53:05
- ***************
- *** 25,30 ****
- --- 25,31 ----
- # include <ioctl.h>
- #endif
- #include <assert.h>
- + #include <unistd.h>
- #ifdef __TURBOC__
- #include <sys\types.h>
- #else
- ***************
- *** 60,66 ****
- const struct utimbuf *tset;
- {
- int fh;
- ! time_t actime, modtime;
- unsigned long dtime; /* dos time equivalent */
-
- char filename[PATH_MAX];
- --- 61,67 ----
- const struct utimbuf *tset;
- {
- int fh;
- ! unsigned long actime, modtime;
- unsigned long dtime; /* dos time equivalent */
-
- char filename[PATH_MAX];
- ***************
- *** 69,103 ****
-
- if (tset)
- {
- ! modtime = tset->modtime;
- ! actime = tset->actime;
- }
- else
- {
- ! time(&actime);
- modtime = actime;
- }
-
- (void)_unx2dos(_filename, filename);
-
- ! dtime = _dostime(actime);
- ! settime.actime = (unsigned short) ((dtime >> 16) & 0xFFFF);
- ! settime.acdate = (unsigned short) (dtime & 0xFFFF);
- ! dtime = _dostime(modtime);
- ! settime.modtime = (unsigned short) ((dtime >> 16) & 0xFFFF);
- ! settime.moddate = (unsigned short) (dtime & 0xFFFF);
- fh = (int) Fopen(filename, 2);
- if (fh < 0) {
- errno = -fh;
- return -1;
- }
-
- res = -EINVAL;
- ! if (__mint > 90)
- ! res = Fcntl(fh, (long)&settime, FUTIME);
- !
- if (res == -EINVAL)
- (void)Fdatime((_DOSTIME *) &dtime, fh, 1);
-
- if ((fh = Fclose(fh)) != 0) {
- errno = -fh;
- --- 70,111 ----
-
- if (tset)
- {
- ! modtime = _dostime (tset->modtime);
- ! actime = _dostime (tset->actime);
- }
- else
- {
- ! actime = ((long) Tgettime () << 16) | (Tgetdate () & 0xFFFF);
- modtime = actime;
- }
-
- (void)_unx2dos(_filename, filename);
-
- ! settime.actime = (unsigned short) ((actime >> 16) & 0xFFFF);
- ! settime.acdate = (unsigned short) (actime & 0xFFFF);
- ! settime.modtime = (unsigned short) ((modtime >> 16) & 0xFFFF);
- ! settime.moddate = (unsigned short) (modtime & 0xFFFF);
- fh = (int) Fopen(filename, 2);
- if (fh < 0) {
- + /* Kludge: return success for dirs even though we failed */
- + if ((fh == -ENOENT) && (Fattrib(filename, 0, 0) == FA_DIR))
- + return 0;
- errno = -fh;
- return -1;
- }
-
- res = -EINVAL;
- ! if (__mint > 90) {
- ! if (tset)
- ! res = Fcntl(fh, (long)&settime, FUTIME);
- ! else
- ! res = Fcntl(fh, (long)0, FUTIME);
- ! }
- if (res == -EINVAL)
- + {
- + dtime = modtime;
- (void)Fdatime((_DOSTIME *) &dtime, fh, 1);
- + }
-
- if ((fh = Fclose(fh)) != 0) {
- errno = -fh;
- ***************
- *** 111,124 ****
- {
- unsigned long dtime;
- unsigned date, time;
-
- assert(t != 0);
- dtime = _dostime(*t);
- date = (int) (dtime & 0xffff);
- time = (int) (dtime >> 16) & 0xffff;
-
- ! if (Tsetdate(date) || Tsettime(time)) {
- ! errno = EBADARG;
- return -1;
- }
- return 0;
- --- 119,133 ----
- {
- unsigned long dtime;
- unsigned date, time;
- + long r;
-
- assert(t != 0);
- dtime = _dostime(*t);
- date = (int) (dtime & 0xffff);
- time = (int) (dtime >> 16) & 0xffff;
-
- ! if ((r = Tsetdate(date)) || (r = Tsettime(time))) {
- ! errno = r == -1 ? EBADARG : (int) -r;
- return -1;
- }
- return 0;
-